<?php

class Pdms_shapcode_model extends CI_Model {
	
	public function __construct() {
		$this->load->database();
	}
	
	//通过code查询，但是code都是POST过来的
	public function get_by_code() {
		$type = $this->input->post('type');
		$standard = $this->input->post('standard');
		$subtype = $this->input->post('subtype');
		$contype = $this->input->post('contype');
		$classthk = $this->input->post('classthk');
		$dn1 = $this->input->post('dn1');
		$dn2 = $this->input->post('dn2');
		
		$code = $standard.$type.$subtype.$contype.$classthk.$dn1.$dn2;
		
		$sqlstring = "select * from shapcodes where code LIKE '".$code."'";
		$query = $this->db->query($sqlstring);
		return $query->result_array();
		
	}
	
	//通过type_code查询

	
	//新增

	
	//修改

	
	//删除

	
}